<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<link href="lib/css/default.css" rel="stylesheet" type="text/css" />
<link href="lib/css/form.css" rel="stylesheet" type="text/css" />
<style type="text/css">  
   #messageBox{  
       background: white;  
   }  
   .success{  
       background: green;  
   }  
   .failure{  
       background: red;  
   }  
</style>  
<jsp:include page="inc/css.jsp"></jsp:include>
<jsp:include page="inc/js.jsp"></jsp:include>
 <SCRIPT LANGUAGE="JavaScript">  
  /* 
    对于表单里的所有元素都已经知道的情况， 
    即不是动态产生表单元素的时候 
  */  
    $(document).ready(function(){  
    /* 
        $.validator.setDefaults({        
            submitHandler: function(form) {     
                form.submit();     
            }        
        });  
 */
        $("#form").validate({ 
            highlight: function(element, errorClass) { 
             $(element).fadeOut(function() { 
                $(element).fadeIn() 
             }) 
            }, 
            //validClass:"valid",  
            errorClass:"failure",  
            errorLabelContainer: "#messageBox",  
            wrapper: "div",  
            rules:{  
                "loginName":{required:true},  
                "pwd":{required:true},
                "code":{required:true}
            },  
            messages:{  
                "loginName":{required:"登录名是必填项！"},  
                "pwd":{required:"密码是必填项！"},
                "code":{required:"验证码是必填项！"} 
            },  
            success:function(label){  
                //label.text("OK");  
            }  
        });  
    });
  </SCRIPT>  
</head>
<body>
<jsp:include page="head.jsp"></jsp:include>
		<div class="container">
			<div class="header"></div>
			<div class="mainContent">
				<div class="news">
				<fieldset style="width: 300px;margin: 200xp auto;"><ul id="messageBox"></ul>
	<legend>个人会员登录 </legend>
	<form action="userlogin.do" id="form" method="post">
		<div><label>登录名：</label><input type="text" name="loginName" value="${param.loginName }"></div>
		<div><label>密　码：</label><input type="password" name="pwd"></div>
		<div><label>验证码：</label><input type="text" name="code" style="width:30px;"> <img style="margin: 0;border: 0;cursor: hand" title="点击切换图片" align="top" src="getCodeImg" onClick="codeImg(this);"/></div>
		<center><input type="submit" value="登录"> <input type="reset"value="重置"></center>
	</form>
</fieldset>
				</div>
			</div>
			<div class="footer"><jsp:include page="foot.jsp"></jsp:include></div>
		</div>

</body>
</html>